import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/home/Home'
import Index from '../components/home/Index'
import Serve from '../components/home/Serve'
import Circle from '../components/home/Circle'
import Chat from '../components/home/Chat'
import My from '../components/home/My'
import More from '../components/more/More'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Home,
    redirect: '/index',
    children: [
      { path: '/index', component: Index },
      { path: '/serve', component: Serve },
      { path: '/circle', component: Circle },
      { path: '/chat', component: Chat },
      { path: '/my', component: My }

    ]
  },
  {
    path: '/more',
    component: More
  }

]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
